package cn.com.blueInfo.bpm.template.request;

import cn.com.blueInfo.bpm.common.request.BaseDTO;
import cn.com.blueInfo.bpm.common.request.BaseQueryDTO;
import com.alibaba.fastjson.JSONObject;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 流程图配置表 接收参数机校验
 * @author suxch
 * @since 2025-08-24 01:41:15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "流程图配置 接收参数及校验")
public class ViewDTO extends BaseDTO {

    /** 流程定义ID */
    @NotNull(message = "流程定义ID 不能为空")
    @Schema(description = "流程定义ID")
    private Long processId;
    /** 节点数组 */
    @NotBlank(message = "节点数组 不能为空")
    @Schema(description = "节点数组")
    private JSONObject nodes;
    /** 连线数组 */
    @NotBlank(message = "连线数组 不能为空")
    @Schema(description = "连线数组")
    private JSONObject edges;
    /** 画图试图配置 */
    @Schema(description = "画图试图配置")
    private JSONObject viewConfig;

    /**
     * 流程图配置 接收分页查询参数
     * @author suxch
     * @since 2025-08-21 05:08:55
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    @Schema(description = "流程图配置 接收分页查询参数")
    public static class QueryDTO extends BaseQueryDTO {

        /** 流程定义ID */
        @Schema(description = "流程定义ID")
        private Long processId;
        /** 节点数组 */
        @Schema(description = "节点数组")
        private JSONObject nodes;
        /** 连线数组 */
        @Schema(description = "连线数组")
        private JSONObject edges;
        /** 画图试图配置 */
        @Schema(description = "画图试图配置")
        private JSONObject viewConfig;

    }

    /**
     * 流程图配置 接收部分更新参数及校验
     * @author suxch
     * @since 2025-08-21 05:08:55
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    @Schema(description = "流程图配置 接收部分更新参数及校验")
    public static class UpdatePartialDTO extends BaseDTO {

        /** 画图试图配置 */
        @Schema(description = "画图试图配置")
        private JSONObject viewConfig;

    }

}